<template>
    <div class="xzcswdxcx-hotags">
        <div class="title">
            <div class="line"></div>
            小竹问答小程序
        </div>
        <div class="code">
            <img
                src="https://xzcs-video.oss-cn-beijing.aliyuncs.com/pc/wx_code.png"
                alt="微信小程序"
            />
            <div>微信扫码&nbsp;&nbsp;随时随地提问</div>
        </div>
    </div>
</template>

<script>
import { getHotLabel_chat } from "@/assets/api/csjhApi";
import { mapState, mapMutations } from "vuex";
export default {
    name: "hotTags",
    props: {
        item: {
            type: Object,
            default: () => {
                return {};
            },
        },
        showMoney: {
            type: Boolean,
            default: () => {
                return true;
            },
        },
    },
    data() {
        return {
            tags: [],
        };
    },
    computed: {
        ...mapState("common", {
            hotTags: (state) => state.hotTags,
        }),
    },
    mounted() {
        // this.getHotLabel_chat();
    },
    methods: {
        ...mapMutations("common", ["set_hotTags"]),

        async getHotLabel_chat() {
            const res = await getHotLabel_chat({});
            if (res.code == 1) {
                for (let item of res.data) {
                    item.checked = false;
                }
                // this.tags.push(...res.data);
                this.set_hotTags(res.data);
            }
        },
        search(item) {
            this.$emit("search", item);
        },
    },
};
</script>

<style lang="scss">
.xzcswdxcx-hotags {
    margin-left: 13px;
    width: 326px;
    border-radius: 10px;
    background: #ffffff;
    .title {
        padding: 18px 0;
        font-size: 18px;
        color: #333333;
        border-bottom: 1px solid #f3f3f3;
    }

    .line {
        display: inline-block;
        width: 3px;
        height: 20px;
        background: #1c87f3;
        margin-right: 19px;
        position: relative;
        top: 3px;
    }
    .code {
        padding: 25px 14px;
        padding-bottom: 10px;
        text-align: center;
    }
    .code > img {
        width: 200px;
        height: 200px;
    }
    .code > div {
        padding-top: 4px;
        font-size: 14px;
        color: #666666;
        line-height: 50px;
    }
}
</style>
